package beans;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.beans.VetoableChangeListener;
import java.beans.VetoableChangeSupport;
import java.io.Serializable;

public class JNTTypeEC implements Serializable {

	private static final long serialVersionUID = 8685044281271270572L;
	
	private Type type;
	private EC eC;
	private int nbHeuresMaquette;

	PropertyChangeSupport changeSupport;
	VetoableChangeSupport vetoableSupport;
	
	public JNTTypeEC() {}
	
	public JNTTypeEC(Type type, EC eC, int nbHeuresMaquette) {
		super();
		this.type = type;
		this.eC = eC;
		this.nbHeuresMaquette = nbHeuresMaquette;
	}

	public Type getType() {
		return type;
	}
	
	public void setType(Type type) {
		this.type = type;
	}
	
	public EC geteC() {
		return eC;
	}
	
	public void seteC(EC eC) {
		this.eC = eC;
	}
	
	public int getNbHeuresMaquette() {
		return nbHeuresMaquette;
	}
	
	public void setNbHeuresMaquette(int nbHeuresMaquette) {
		this.nbHeuresMaquette = nbHeuresMaquette;
	}
	
	public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.addPropertyChangeListener(listener);
	}
	
	public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.removePropertyChangeListener(listener);
	}
	
	public synchronized void addVetoableChangeListener(VetoableChangeListener listener) {
		vetoableSupport.addVetoableChangeListener(listener);
	}
	
	public synchronized void removeVetoableChangeListener(VetoableChangeListener listener) {
		vetoableSupport.removeVetoableChangeListener(listener);
	} 
}
